package after_sale_order

import (
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type AfterSaleOrderRouter struct {}

// InitAfterSaleOrderRouter 初始化 售后管理 路由信息
func (s *AfterSaleOrderRouter) InitAfterSaleOrderRouter(Router *gin.RouterGroup,PublicRouter *gin.RouterGroup) {
	afterSaleOrdersRouter := Router.Group("afterSaleOrders").Use(middleware.OperationRecord())
	afterSaleOrdersRouterWithoutRecord := Router.Group("afterSaleOrders")
	afterSaleOrdersRouterWithoutAuth := PublicRouter.Group("afterSaleOrders")
	{
		afterSaleOrdersRouter.POST("createAfterSaleOrder", afterSaleOrdersApi.CreateAfterSaleOrder)   // 新建售后管理
		afterSaleOrdersRouter.DELETE("deleteAfterSaleOrder", afterSaleOrdersApi.DeleteAfterSaleOrder) // 删除售后管理
		afterSaleOrdersRouter.DELETE("deleteAfterSaleOrderByIds", afterSaleOrdersApi.DeleteAfterSaleOrderByIds) // 批量删除售后管理
		afterSaleOrdersRouter.PUT("updateAfterSaleOrder", afterSaleOrdersApi.UpdateAfterSaleOrder)    // 更新售后管理
	}
	{
		afterSaleOrdersRouterWithoutRecord.GET("findAfterSaleOrder", afterSaleOrdersApi.FindAfterSaleOrder)        // 根据ID获取售后管理
		afterSaleOrdersRouterWithoutRecord.GET("getAfterSaleOrderList", afterSaleOrdersApi.GetAfterSaleOrderList)  // 获取售后管理列表
	}
	{
	    afterSaleOrdersRouterWithoutAuth.GET("getAfterSaleOrderPublic", afterSaleOrdersApi.GetAfterSaleOrderPublic)  // 售后管理开放接口
	}
}
